﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DiagrammInternalStructure.Exceptions;

namespace DiagrammInternalStructure
{
    public enum ProtectionType
    {
        PrivateType,
        ProtectedType,
        PublicType
    }
    public class AtomicInstance:ObjectsCounter
    {
        private string m_name = string.Empty;
        private ProtectionType m_protectionType = ProtectionType.PrivateType;

        protected AtomicInstance()
        { }

        public AtomicInstance(string name, ProtectionType protection)
        {
                m_name = name;
                m_protectionType = protection;            
        }

        public ProtectionType Protection
        {
            get
            {
                return m_protectionType;
            }
            set
            {
                m_protectionType = value;
            }
        }

        public string Name
        {
            get
            {
                return m_name;
            }
            set
            {
                if (value != string.Empty)
                {
                    m_name = value;
                }
             }
        }


    }
}
